<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/6/25
  Time: 12:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.ArrayList,bean.Bookinfo" %>
<html>
<head>
    <title></title>
</head>
<body>
<center>
    <form action="/servlets/borrow.do" method="post">
        <table align="center" border="1" >
            <caption><h2>现有图书信息</h2></caption><p>
            <tr><td colspan="6" align="right"><a href="/check.jsp">点击查询</a></td></tr>
            <tr>
                <font size="2" face="黑体" color="blue">
                    <th>编号</th>
                    <th>书名</th>
                    <th>作者</th>
                    <th>出版社</th>
                    <th>出版日期</th>
                    <th colspan="2">借阅</th></font>
            </tr>
                <%
            request.setCharacterEncoding("utf-8");
            ArrayList<Bookinfo> list=(ArrayList<Bookinfo>)request.getAttribute("list");
            for(Bookinfo bi:list){
            String id=bi.getId();
        %>
            <tr>
                <td><%= bi.getId()%></td>
                <td><%= bi.getName()%></td>
                <td><%= bi.getAuthor()%></td>
                <td><%= bi.getPress()%></td>
                <td><%= bi.getDate()%></td>
                <td><input type="radio" name="borrow" value="123"></td>
                <input type="hidden" name="id" value="<%= bi.getId()%>">
            </tr>
                <%
            }
        %>
        </table><p>
        <input type="submit" value="提交">
    </form>
</center>
</body>
</html>

